package com.chenjun.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chenjun.domain.pojo.User;
import com.chenjun.mapper.UserMapper;
import com.chenjun.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2024-09-23
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Override
    public User finByName(String name) {
        QueryWrapper<User> wrapper = new QueryWrapper<User>()
                .eq("name",name);

        return getOne(wrapper);
    }
}
